package com.broadsoft.cluster.smartcluster.task;

/**
 * 
* FIXME: <A few lines of description of what class is about and what it does.> 
*
* <HR/><B>Modification Block</B>
* <P>
* Version: FIXME: 1.0.1 <BR>
* Author: FIXME: luzhen
* Date: 2011-9-22
* TAG: <A short name to find out all changed made by this modification.>
* Comments: Created.
* Bug fix NO.: <If required>
* </P>
* <P>
* ... Other Modifications following above structure.
* </P>
*
 */
public interface CacheSynchronizer {
    /**
     * Start transferring the partition state.
     * 
     * Return true if transfer finished, otherwise the node should be responsible to call
     * PartitionService.stateTransferCompleted method to notify the coordinator.
     * 
     * @param partition
     * @return
     */
    public void transferState(int partition);
    
    /**
     * Return the cache name.
     * 
     * @return
     */
    public String getCacheName();
    
    /**
     * Drop the partition.
     * 
     * @param partition
     * @return
     */
    public void dropPartition(int partition);
}
